import axios from '@/libs/api.request'

export const getConfig = () => {
  return axios.request({
    url: 'Config/getConfig',
    method: 'post'
  })
}

/**
 * 修改系统配置
 * @id 系统配置主键
 * @withdrawInfo 提现说明
 * @officialPhone 客服电话
 * @minCashWithdrawal 提现金额
 * @withdrawReward 提现比率
 * @minCashWithdrawal 最低提现金额
 * @vipMoney 普通vip价格
 * @superVipMoney 超级vip价格
 * @flowersPrice 鲜花价格
 */
export const editConfig = ({ id, homePic, registerReward, customerService, withdrawReward, cashLimit, protocol }) => {
  const data = {
    id, homePic, registerReward, customerService, withdrawReward, cashLimit, protocol
  }
  return axios.request({
    url: 'Config/editConfig',
    data,
    method: 'post'
  })
}
